From 6af99de37cd929601c69ed3232d4411b8564b8fd Mon Sep 17 00:00:00 2001 From: "kaf24@firebug.cl.cam.ac.uk" Date: Thu, 1 Jun 2006 21:34:47 +0100 Subject: [PATCH] Allow all trace-buffer hypercalls to be executed even when tracing is currently disabled. From: George Dunlap Signed-off-by: Keir Fraser --- xen/common/trace.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/xen/common/trace.c b/xen/common/trace.c index 0cee7126d2..6a7827299a 100644 --- a/xen/common/trace.c +++ b/xen/common/trace.c @@ -178,20 +178,12 @@ int tb_control(dom0_tbufcontrol_t *tbc) spin_lock(&lock); - if ( !tb_init_done && - (tbc->op != DOM0_TBUF_SET_SIZE) && - (tbc->op != DOM0_TBUF_ENABLE) ) - { - spin_unlock(&lock); - return -EINVAL; - } - switch ( tbc->op ) { case DOM0_TBUF_GET_INFO: tbc->cpu_mask = tb_cpu_mask; tbc->evt_mask = tb_event_mask; - tbc->buffer_mfn = __pa(t_bufs[0]) >> PAGE_SHIFT; + tbc->buffer_mfn = opt_tbuf_size ? virt_to_mfn(t_bufs[0]) : 0UL; tbc->size = opt_tbuf_size * PAGE_SIZE; break; case DOM0_TBUF_SET_CPU_MASK: -- 2.30.2